package com.dashunzi.yueyutianqi.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.dashunzi.yueyutianqi.service.AutoUpdateService;

public class AutoUpdateReceive extends BroadcastReceiver {
    public AutoUpdateReceive() {
    }

    /**
     * 用于每八小时再次开启服务
     *
     * @param context
     * @param intent
     */
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent i = new Intent(context, AutoUpdateService.class);
        System.out.println("----------onreceive方法执行------------");
        context.startService(i);
    }
}
